/**
 * @copyright fpx.com 
 */
package com.fpx.open.platform.domain;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 内部接口返回结果信息,列表返回时用这个封装
 *
 * @author sunkey
 * @date Apr 12, 2013 4:26:18 PM
 * @version 1.0.0 
 */
@XmlRootElement(name="item")
public class ResultInfo<T> implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 返回的数据
	 */
	private T data;
	
	/**
	 * 错误代码, 0 为无错误
	 */
	private String errorCode = "0";
	
	/**
	 * 错误信息
	 */
	private String errorMsg;
	
	/**
	 * 1:成功,0失败
	 */
	private int status = 1;
	
	/**
	 * 用于返回客户端标识
	 */
	private String businessId;
	
	/**
	 * 备注，可以放以客户端需要信息
	 */
	private String remark;

	@XmlElement
	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	/**
	 * 暂时兼容HK易邮网
	 * @see getErrorCode() 
	 * @param status
	 */
	@Deprecated
	@XmlTransient
	@JsonIgnore
	public int getStatus() {
		return status;
	}

	/**
	 * 暂时兼容HK易邮网
	 * 
	 * @param status
	 */
	@Deprecated
	public void setStatus(int status) {
		this.status = status;
	}

	public String getBusinessId() {
		return businessId;
	}

	public void setBusinessId(String businessId) {
		this.businessId = businessId;
	}

	@XmlTransient
	@JsonIgnore
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * 错误代码, 0 为无错误
	 */
	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}
	
	
	
}
